//
// Created by DELL on 2025/2/5.
//

#include "TaskBase.h"

namespace zdotp {
    TaskBase::TaskBase() : result_(nullptr){}

    void TaskBase::set_result(Result *result) {
        result_ = result;
    }

    void TaskBase::exec() {
        if (result_ != nullptr) {
            result_->set_value(run());
        }
    }
} // zdotp